package multithreading;

import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;

public class myTestMain {
    public static void main(String[] s) throws ExecutionException, InterruptedException {
        myThread t1 = new myThread();
        myThread t2 = new myThread();
        t1.setName("No.1-");
        t2.setName("No.2-");
        t2.setDaemon(true);
        t1.start();
        t2.start();
//
//        myRunnable r1 = new myRunnable();
//        myRunnable r2 = new myRunnable();
//        Thread t3 = new Thread(r1);
//        Thread t4 = new Thread(r2);
//        t3.setName("No.3");
//        t4.setName("No.4");
//        t3.start();
//        t4.start();

//        myCall myCall = new myCall();
//        FutureTask<Integer> ft = new FutureTask<>(myCall);
//        Thread t = new Thread(ft);
//        t.start();
//        System.out.println(ft.get());
    }
}
